/*
 * 文件名：ParkwellMemberController.java	 
 * 时     间：上午11:21:53
 * 作     者：Administrator       
 * 版     权： 2012-2022 湖南智软网络科技, 公司保留所有权利.
 * 联     系：http://www.073586.com/
 */
package com.local.controller.admin;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.local.entity.vo.PropertiesVo;
import com.local.service.face.ParkwellMemberService;
import com.qianhai.common.constants.CommonContans;
import com.qianhai.common.controller.BaseController;

/**
 * 
 * 类描述：页面统一管理配置文件
 * @ClassName: LocalPropertiesController 
 * @author zhangw
 * @date 2016年3月9日 上午11:09:34
 */
@RestController
@RequestMapping(value = "/admin/properties", method = RequestMethod.POST)
public class LocalPropertiesController extends BaseController
{
	@Autowired
	private ParkwellMemberService parkwellMemberService;
	
	
	@RequestMapping(value = "/localProperties.action", consumes = "application/json", produces = "application/json")
	@ResponseBody
	public ModelMap localProperties(String typeProperties)
	{
		ModelMap resultMap = new ModelMap();
		
		try
		{
			PropertiesVo pv=parkwellMemberService.localProperties(typeProperties);
			resultMap.put(CommonContans.STRUTS_DATA, pv);
			resultMap.put(CommonContans.STRUTS_RESULT,
					CommonContans.STRUTS_SUCCESS);
		} catch (Throwable e)
		{
			// 请保持所有代码一直性，没有特殊处理请使用该代码.
			this.printExction(resultMap, e);
		}
		return resultMap;
	}
	
	@RequestMapping(value = "/updateProperties.action", consumes = "application/json", produces = "application/json")
	@ResponseBody
	public ModelMap updateProperties(@RequestBody PropertiesVo propertiesVo)
	{
		ModelMap resultMap = new ModelMap();
		
		try
		{
			parkwellMemberService.updateProperties(propertiesVo);
			resultMap.put(CommonContans.STRUTS_RESULT,
					CommonContans.STRUTS_SUCCESS);
		} catch (Throwable e)
		{
			// 请保持所有代码一直性，没有特殊处理请使用该代码.
			this.printExction(resultMap, e);
		}
		return resultMap;
	}
}
